<?php
/* @var $this UserController */
/* @var $model User */

$this->breadcrumbs=array(
	'Usuários'=>array('index'),
	'Administrar',
);

$this->menu=array(
	array('label'=>'Novo Usuário', 'url'=>array('create')),
);

Yii::app()->clientScript->registerScript('search', "
$('.search-button').click(function(){
	$('.search-form').toggle();
	return false;
});
$('.search-form form').submit(function(){
	$('#user-grid').yiiGridView('update', {
		data: $(this).serialize()
	});
	return false;
});
");
?>

<h1>Administrar Usuários</h1>

<?php $this->widget('zii.widgets.grid.CGridView', array(
	'id'=>'user-grid',
	'dataProvider'=>$model->search(),
	'filter'=>$model,
	'columns'=>array(
		/*'id',                        */
		'username',
		/*'password',                  */               	
                'email',           
                array(
                        'name'=>'parea',
                        'value'=>'$data->areaText($data->parea)',
                        
                        ),
                array(
                        'name'=>'punidade',
                        'value'=>'$data->unidadeText($data->punidade)',
                        
                        ),       
                array(
                        'name'=>'pempresa',
                        'value'=>'$data->empresaText($data->pempresa)',
                        
                        ),
                array(
                        'name'=>'pprojeto',
                        'value'=>'$data->projetoText($data->pprojeto)',
                        
                        ),
                array(
                        'name'=>'pusuario',
                        'value'=>'$data->usuarioText($data->pusuario)',
                        
                        ),
                array(
                        'name'=>'pacentral',
                        'value'=>'$data->acentralText($data->pacentral)',
                        
                        ),
                 array(
                        'name'=>'pdoctecnica',
                        'value'=>'$data->doctecnicaText($data->pdoctecnica)',
                        
                        ),
		'idProj',
		array(
			'class'=>'CButtonColumn',
                        'htmlOptions' => array('style'=>'width:38px'),
                        'headerHtmlOptions'=>array('style'=>'width:38px;'),
		),
	),
)); ?>
